import request from '@/utils/request'

// 获取数据结构
export const organizational = () => {
  return request({
    url: '/company/department'
  })
}

// 删除数据结构
export const delorganizational = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

// 新增数据结构
export const xinzen = (data) => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 修改
export const xiugai = (data) => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}

// 获取详细数据
export const xiangxishuju = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}
